package com.andrew.service;

import java.sql.SQLException;
import java.util.List;

import com.andrew.entity.Cart;
import com.andrew.entity.CartDetail;
import com.andrew.entity.CartDetailBean;
import com.andrew.entity.Customer;


public interface CartService {
	public String addCart(int bookid,int quantity,Cart cart)throws SQLException;
	
	public Cart getCart (int customerId)throws SQLException;
	
	public String updateQuantity(int service,int bookId,Cart cart)throws SQLException;
	
	public List<CartDetailBean> queryCartDetail(Cart cart)throws SQLException;
	
	public void clearCart(Customer customer) throws SQLException;

	public abstract long countGoodsInCart(Cart cart) throws SQLException;

	/**
	 * 删除购物车中的单个商品
	 * @param bookId
	 * @param customer
	 */
	public int deleteoneCartDetail(int bookId, Cart cart) throws SQLException;
}
